x86/traps: don't use 16bit reads of segment registers
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 14 Oct 2015 10:48:36 +0000 (12:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 14 Oct 2015 10:48:36 +0000 (12:48 +0200)
commitee653b97ce369decfdd4d18979fd9f6aec0073c2
tree42b271d8099aaec05608d6b1b2dcdfb992ba6749
parent9d967cb979e92fd6bd46c967f1d204f33b24fb08
x86/traps: don't use 16bit reads of segment registers

When executing `mov %sreg, %r32`, older Intel processors would leave the
upper 16 bits of %r32 undefined.  P4 processors and newer, as well as
all AMD processors will zero extend the segment selector.

As Xen only supports 64bit these days, there is no need to use the
operand-size override prefix and suffer the resulting pipeline overhead.

Rename read_segment_register() to read_sreg() and drop the existing
read_sreg() wrapper which took a regs parameter and did nothing with it.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/domain.c
xen/arch/x86/traps.c
xen/arch/x86/x86_64/traps.c
xen/include/asm-x86/system.h